package com.ws.abstr;

import com.ws.simple.BasicBean;

public abstract class AbstractFactory {
	
	protected abstract BasicBean getBean();
	
	public BasicBean getBean(String name){
		if("cat".equalsIgnoreCase(name)){
			return new CatFactory().getBean();
		}else if("dog".equalsIgnoreCase(name)){
			return new DogFactory().getBean();
		}else{
			return null;
		}
	}

}
